package com.privasphere.wikidoclet.dataTransport;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.privasphere.wikidoclet.util.WikiDocletCfg;

public class WikiTransporterApplication {
	
	public static final Logger LOGGER = LoggerFactory.getLogger(WikiTransporterJWBF.class.getName());
	
	/**
	 * Main method that starts the whole WikiTransporte application.
	 * 
	 * @param args
	 * @throws Exception
	 */
	public static void main(String[] args) throws Exception {
		WikiDocletCfg cfg = WikiDocletCfg.getInstance();
		
		if (LOGGER.isTraceEnabled()) {
			StringBuilder tmpArgHolder = new StringBuilder(10);
			for (String s : args) {
				tmpArgHolder.append(" \"").append(s).append("\"");
			}
			LOGGER.trace("parameters " + tmpArgHolder);
		}
		cfg.loadDataTransporterConfig(args);
		if (LOGGER.isTraceEnabled()) {
			LOGGER.trace("Arguments:");
			LOGGER.trace(WikiDocletCfg.getInstance().getProperties().toString());
		}
		
		ThreadCoordinator myThreadCoordinator = new ThreadCoordinator();
		myThreadCoordinator.startCoordinating();
		
	}

}
